<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>浮动</title>
		<style>
			#main>div{
				background-color: rgba(122, 111, 200, 0.6);
				color:white;
				text-align: center;
				line-height: 100px;
				height: 100px;
				width:100px;
			border: 1px solid red;
				font-size:40px;
				margin: 5px;
				float: right;
			}
		</style>
	</head>
	<body>
		<div id="main">
			<div style="height: 200px;">1</div>
			<div>222</div>
			<div>3</div>
			<div>4</div>
			<div>5</div>
			<div>6</div>
			<div>7</div>
			<div>a</div>
			<div>b</div>
			<div>c</div>
			<div>g</div> 
		</div>
	</body>
</html>